﻿using MakeItWeb.Framework;
using System;

namespace AllNations.UI.Controls
{
    public partial class ShoutoutConfiguration : System.Web.UI.UserControl, IDynamicPageConfiguration
    {
        Framework.ShoutoutConfiguration _Config = new Framework.ShoutoutConfiguration();

        protected void Page_Load(object sender, EventArgs e)
        {

        }

        string IDynamicPageConfiguration.ConfigurationSectionLabel
        {
            get { return "Shoutout page size:"; }
        }

        void IDynamicPageConfiguration.LoadSettings(string sSettings)
        {
            _Config.Deserialize(sSettings);

            txtPageSize.Text = _Config.PageSize.ToString();
        }

        string IDynamicPageConfiguration.SaveSettings()
        {
            _Config.PageSize = int.Parse(txtPageSize.Text.Trim());
            return _Config.Serialize();
        }
    }
}